using System;
using System.Collections.Generic;
using System.Text;

namespace GCGM
{
	class Output : IComparable<Output>
	{
		public int seed;
		public double tol;
		public int nRuns;
		public int ndim;
		public double before;
		public double after;
		public int evaluations;
		public double distance;
		public int runnumber;

		public Output(int seedIn, double tolIn, int nRunsIn, int ndimIn, double beforeIn, double afterIn, int evaluationsIn, double distanceIn, int runnumberIn)
		{
			seed = seedIn;
			tol = tolIn;
			nRuns = nRunsIn;
			ndim = ndimIn;
			before = beforeIn;
			after = afterIn;
			evaluations = evaluationsIn;
			distance = distanceIn;
			runnumber = runnumberIn;
		}

		#region IComparable<Output> Members

		public int CompareTo(Output other)
		{
			Output temp = other;
			if (this.tol > temp.tol)
			{
				return -1;
			}
			else if (this.tol < temp.tol)
			{
				return 1;
			}
			else
			{
				if (this.seed > temp.seed)
				{
					return 1;
				}
				else if (this.seed < temp.seed)
				{
					return -1;
				}
				else
				{
					return 0;
				}
			}
		}

		#endregion
	}
}
